// MainFrm.h : interface of the CMainFrame class
//


#pragma once

#include "Knot.h"
#include "TransformDoc.h"

class CTransformDoc;
class CTransformView;
class CTFTreeView;
class CTimelineView;

class CMainFrame : public CFrameWnd
{
	
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

// Attributes
public:
	CTransformDoc*				GetTargetDoc() { return m_pTargetDoc; }
	CTransformView*				GetMainView() { return m_pMainView; }
	CTFTreeView*				GetTreeView() { return m_pTreeView; }
	CTimelineView*				GetTimelineView() { return m_pTimelineView; }

// Operations
public:

// Overrides
public:
	virtual BOOL				PreCreateWindow(CREATESTRUCT& cs);
	virtual BOOL				OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);

// Implementation
public:
	virtual ~CMainFrame();

protected:  // control bar embedded members
	CStatusBar					m_wndStatusBar;
	CToolBar					m_wndGViewerToolBar;
	CToolBar					m_wndNodeDesignBar;
	CSplitterWnd				m_wndMainSplitter;
	CSplitterWnd				m_wndViewSplitter;
	CTransformDoc*				m_pTargetDoc;
	CTransformView*				m_pMainView;
	CTFTreeView*				m_pTreeView;
	CTimelineView*				m_pTimelineView;

// Generated message map functions
protected:
	afx_msg int					OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void				OnViewPan();
	afx_msg void				OnViewRotate();
	afx_msg void				OnSelectNode();
	afx_msg void				OnFileSave();
	afx_msg void				OnFileOpen();
	afx_msg void				OnFlag();
	DECLARE_MESSAGE_MAP()

private:
	CString GetFilePath();
	BOOL IsFileExist(CString strFileName);
	

	UINT						m_FlagCheckStatus;
	UINT						m_PanCheckStatus;
	UINT						m_RotateCheckStatus;
};


